Image sensor arrays are widely used in digital photography for detecting image signals. The minimum unit for framing an object (scene) in each image sensor is called a pixel. In other words, each pixel location is a photo-sensing unit.
The pixel itself responds to light intensity only but has no discrimination capability to light color. Therefore, a simple image sensor array can only take a gray level image. In general, a color filter array (CFA) of a regular pattern, for example, of red, green and blue color (the three primary colors: R, G, and B) filter, overlies the image sensor so that the sensor can detect the color image at different pixel locations. However, the image sensor overlies by such CFA only detects one color at each pixel location and, accordingly, can not capture original information corresponding to all the three primary colors for each pixel location. As shown in FIG. 1, a typical arrangement of the color filter array of the image sensor is that the green pixels are arranged horizontally and vertically in a checkerboard pattern, and the red and blue pixels are each horizontally and vertically adjacent to a green pixel. Another common arrangement is of CYGM (cyan-yellow-green-magenta) type.
Because this kind of image sensor captures one color component for each pixel location, after using an image processor to receive image pixel brightness data of an image sensor array, an interpolation method is usually exploited to construct lost color components of each pixel location to obtain three full color image planes for each object (scene). In conventional color interpolation methods, other pixels beside each primary color pixel are made use of for calculating out data of the other two primary colors. For example, as shown in FIG. 1, there are four blue pixels 12 and four green pixels 14 around each red pixel 10. The pixel interpolation system will utilize the color value of the nearest four blue pixels 12 and the four green pixels 14 for interpolating the lost blue and green colors for the central red pixel 10, thereby obtaining a complete RGB color information for the of the red pixel location 10. The interpolation principle for the blue and green pixels 12 and 14 is the same. When capturing some images having detailed color lines or delicate color variation, however, if one of the four averaged pixels is located at the edge of the image or the signal has a larger variation, the average value will be affected by this pixel and thus prone to color edge artifacts in the image, thus affecting the whole image quality.
In order to improve the above problem, R.O.C. Pat. No. 413797 discloses an edge interpolation method for color rebuilding, wherein interpolation is carried out in the horizontal, vertical, or diagonal (45 degrees) direction of the central pixel. In the above disclosure, however, only the trend of the brightness value of green colors is used to determine the direction. There still exists possibility of erroneous determination of the direction to cause inaccurate result, hence being not able to provide a stable resolution.
Accordingly, the present invention aims to propose an interpolation method to reduce artifacts caused by detailed color lines and delicate color variation to improve the image quality.